<?php
class WildCard extends BaseCard
{
	function WildCard($color)
	{
		$this->color = $color;
	}

	function equal($state)
	{
		return $state->type == 0 || $state->punished;
	}

	function overlay($state)
	{
		$state->punished = false;
		
		if(!empty($this->color))
		{
			$state->color = $this->color;
		}
	}
}